#pragma once
#ifndef RENDERER_H
#define RENDERER_H

#include "Window.h"
#include "Sprite.h"

namespace Graphics
{
	class Renderer
	{
	private:
		int _width;
		int _height;
		Window* _window;

	public:
		Renderer(Window* window);
		~Renderer() {};

		void Draw(ImageBuffer* image, int x, int y);
		void Draw(Sprite* sprite);
		void Clear(Pixel& pixel);

		// draws points...
		void DrawPoint(Pixel& pixel, int x, int y);

		// use bresenham line drawing algorithm, 
		// I'll probably use the assembly implementation
		// written in the PAPERS folder
		void DrawLine(Pixel& pixel, int x1, int y1, int x2, int y2);
		
		inline void DrawPoint(Pixel& pixel,Vector& location)
		{ DrawPoint(pixel, static_cast<int>(location.X), static_cast<int>(location.Y)); };
		
		inline void DrawLine(Pixel& pixel,Vector& start, Vector& end) 
		{ 
			DrawLine(pixel, static_cast<int>(start.X), 
				static_cast<int>(start.Y), 
				static_cast<int>(end.X),
				static_cast<int>(end.Y) ); 
		};

	};
}

#endif